<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

require  'db_con.php';

$e_id=isset($_GET['id'])?$_GET['id']:0;
$e_id=is_numeric($e_id)?$e_id:0;
$sql="delete from tb_emp where e_id={$e_id}";
$rs=$db->query($sql);
$db->close();
if($rs==true)
{
    header("Location:index.php");
}
else{
    echo'<script type="text/javascript">';
    echo'alert("删除留言失败");';
    echo'window.location.href="index.php";';
    echo'</script>';
}